<?php
namespace App\Repos;

use App\Models\Order;

use App\Services\RedisService;

use DB;
use Log;
use Carbon\Carbon;

class OrderRepo
{
	// 后台订单分页
	public static function  paginate($where=[],$num=20,$orderBy='id',$orderWay='desc')
	{
		$query = Order::query();
		$list = $query->where($where)
	  				->with('car')
	  				->orderBy($orderBy,$orderWay)
	  				->paginate($num); 
	  	return $list;  
	}

	
	public static function find($where)
	{		
		$order = Order::where($where)->first();
		return $order;
	}

	
	

	

	

	
	
	

	
	
	
}